/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.atlascon.java2gpb.serialization;

import com.google.protobuf.Message.Builder;

/**
 *
 * @author Tom
 */
public interface GPBSerializer<E> {
    
    /**
     * Assigns Object obj to field with name "name" in builder
     * 
     * @param name builder field name
     * @param obj object to assign
     * @param builder supplied GPB builder
     * @throws Exception 
     */
    public void serialize(String name, Object obj, Builder builder) throws Exception;
    
    public E deserialize(ClassInfo cls, Object gpbValue) throws Exception;
        
    
}
